package org.timeticker;

/**
 * Object list listener
 *
 * @author Ivan Latysh
 * @version 0.1
 * @since 10-Aug-2007 : 18:40:54 PM
 */
public interface ObjectListListener {

  /**
   * Notify a listener when an object has been added to the list
   *
   * @param list object list
   * @param index object index
   * @param object object that just has been added
   */
  public void objectAdded(ObjectList list, int index, Object object);

  /**
   * Notify a listener when object has been removed
   *
   * @param list object list
   * @param index index of an object before it has been removed
   * @param object removed object
   */
  public void objectRemoved(ObjectList list, int index, Object object);

  /**
   * Notify a listener when object has been changed
   *
   * @param list object list
   * @param index object index
   * @param object updated object
   */
  public void objectChanged(ObjectList list, int index, Object object);

  /**
   * Notify a listener when list structure has been changed.
   * Multiple objects has been removed or added.
   *
   * @param list object list
   */
  public void listChanged(ObjectList list);

}
